<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin: 0px;
            padding: 0px;
            list-style: none;
        }
        textarea{
            width: 800px;
            margin: 10px auto;
            display: block;
            resize: none;
            outline: none;
        }
        button{
            width: 800px;
            margin: 10px auto;
            display: block;
            background-color: orange;
            border: none;
            outline: none;
            line-height: 40px;
            cursor: pointer;
            color: #fff;
        }
        ul{
            width: 800px;
            margin: 10px auto;
        }
        ul>li{
            background-color: olivedrab;
            margin-bottom: 10px;
            position: relative;
            padding: 4px;
        }
        span{
            position: absolute;
            right: -5px;
            top: -5px;
            cursor: pointer;
        }

    </style>
</head>
<body>
    <textarea name="" id="tt" cols="30" rows="10"></textarea>
    <button id="bn">微博发布</button>
       <ul id="bx">
           <li> 
               昨天晚上有闪电
               <p>2021-06-03</p>
               <span>X</span>
           </li>
       </ul>
                  

       <script>
               bn.onclick=function(){
                   var val=tt.value;
                   var tag=document.createElement('li');
                   tag.innerHTML=  `${val}
                     <p>2021-06-04</p>                   
                    <span> X</span>`
                    bx.appendChild(tag)
                   
               }



       </script>
</body>
</html>